/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chapter5.creational.abstractfactory;

import chapter5.creational.factorymethod.Animal;
import chapter5.creational.factorymethod.Cat;
import chapter5.creational.factorymethod.Dog;

/**
 *
 * @author ASUS
 */
public class MammalFactory extends SpeciesFactory{

    @Override
    public Animal getAnimal(String type) {
        if("dog".equals(type))
        {
            return new Dog();
        }
        else
        {
            return new Cat();
        }
    }
    
}
